<?php
/**
 * @description : report fail for edm
 * @author : william.hu
 * @date : 2010/08/02
 */

ini_set('display_errors','on');
require_once "TVB/MSApi/Client/requires.php";
require_once "TVB/OAuth/common.inc.php";

try {
    $req = OAuthRequest::from_request();
    list($consumer, $token) = $tvb_server->verify_request($req);
    
    $request = $req->get_parameters();

    $client = new MSApiClient();
	$param['email'] = (isset($request['email'])) ? $request['email'] : '';
	$param['error'] = (isset($request['error'])) ? $request['error'] : '';
	$result =  $client->restRequest('MemberAdmin', 'reportFail', $param);
	
	if ($result == true)
	{
		echo 1;
	}
	else
	{
		echo 0;
	}
}
catch (OAuthException $e) {
    print($e->getMessage() . "\n<hr />\n");
    print_r($req);
    die();
}


?>